import request from '@/api';
import { LOCAL_KEY } from '@/constant/dict';

import qs from 'qs';

/**
 * @description:// 登录
 * @param {*} parameter
 * @return {*}
 */
export function loginFunApi(pwd) {
    return request({
        url: '/api/auth/login',
        method: 'post',
        data:{
            password: pwd
        }
    });
}

/**
 * @description:// 退出登录
 * @return {*}
 */
export function outLoginFun() {
    return request({
        url: '/api/auth/logout',
        method: 'post'
    });
}

export function getAuthFirstInfo() {
    return request({
        url: '/api/auth/first',
        method: 'get'
    });
}

export function setAuthFirstPwd(pwd) {
    return request({
        url: '/api/auth/first',
        method: 'post',
        data:{
            pwd
        }
    });
}

export function updatePwd(pwd) {
    return request({
        url: '/api/auth/update',
        method: 'post',
        data: {
            pwd
        }
    });
}
